package org.mwt.ws.xformsservice;

import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebService;
import org.mwt.ws.business.XFormService;
import org.mwt.ws.business.exception.BusinessException;


@WebService(serviceName = "ServicesXDBFormsService", portName = "ServicesXDBFormsPort", targetNamespace = "http://xformsservice.ws.mwt.org/", wsdlLocation = "WEB-INF/wsdl/ServicesXDBFormsService.wsdl")
public class ServicesXDBForms {
    private XFormService service;

    public ServicesXDBForms() {
        super();
        this.service = XFormService.getInstance();
    }


    /**
     * Web service operation
     */
    @WebMethod(operationName = "CreateXForm")
    public String CreateXForm(@WebParam(name = "statement")
    String statement) throws BusinessException {
        return this.service.createXForm("xform_test_db", statement);
    }

    /**
     * Web service operation
     */
    @WebMethod(operationName = "CreateInsertCode")
    public String CreateInsertCode(@WebParam(name = "statement")
    String statement) throws BusinessException {
        return this.service.createInsertCode(statement);
    }

    /**
     * Web service operation
     */
    @WebMethod(operationName = "CreateUpdateCode")
    public String CreateUpdateCode(@WebParam(name = "statement")
    String statement) throws BusinessException {
        return this.service.createUpdateCode(statement);
    }

}
